#include "animation.h"


void drawanimatedplayer()
{
        Uint8* keys;
        keys = SDL_GetKeyState(NULL);
		SDL_PumpEvents();

    if (player.frameTimer <= 0)
    {
        player.frameTimer = TIME_BETWEEN_2_FRAMES;
        player.frameNumber++;


        if( player.frameNumber >= player.sprite->w / PLAYER_WIDTH )
            player.frameNumber = 0;

    }
    else
        player.frameTimer--;

    if ( player.etat == STOP ) player.frameNumber = 0 ;

    Evolue(&player,keys);
	Render(&player,jeu.screen);



}


